package com.cares.event.action;


import com.cares.common.action.DefaultAction;
import com.cares.event.dto.EventProcessDto;
import com.cares.event.entity.TEventExecution;
import com.cares.event.service.EventExecutionService;

/**
 * 事件流的发布，启动action
 * @author xuji
 *
 */
public class EventFlowAction extends DefaultAction {

	private static final long serialVersionUID = -3309203838956537627L;
	
	//流程
	private EventProcessDto eventProcessDto;
	
	//流程启动后的运行信息
	private TEventExecution eventExecutionDto;
	
	private EventExecutionService eventFlowService;
	
	/**
	 * 保存事件流
	 * @return
	 */
	public String saveEventFlow(){
		return "";
	}
	
	/**
	 * 发布时间流程
	 * @return
	 */
	public String deployEventFlow(){
		return "";
	}
	
	/**
	 * 启动事件流程
	 * @return
	 */
	public String startEventFlow(){
		//先保存流程信息，如果流程有变化，则流程版本加一，并生成新的流程--数据库表设计要重新审定
		boolean result = eventFlowService.startEventFlow(eventProcessDto);
		return SUCCESS;
		
	}
	
	/**
	 * 手动执行指定任务
	 */
	public String finishTask(String taskName){
		
		return SUCCESS;
	}
}
